package com.woniu.orderservice.dao;

import com.woniu.orderservice.entity.Orderinfos;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrderinfosDao {
    Orderinfos queryById(Integer id);

    List<Orderinfos> queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit);
    
    List<Orderinfos> findAll();

    List<Orderinfos> queryAll(Orderinfos orderinfos);

    int insert(Orderinfos orderinfos);

    int update(Orderinfos orderinfos);

    int deleteById(Integer id);
    @Select("select * from orderinfos where orderid = #{id}")
    List<Orderinfos> selectOrderinfosByOrderId(Integer id);

    List<Orderinfos> findOrderItemsByOrderId(Integer id);
}